package com.huahua.api.entity.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.util.Date;
import lombok.Data;

/**
 * @author LoveHuahua
 * @date 2021年09月08日 9:55
 * @description believe in yourself
 */
@Data
@TableName(value = "api_novel_book")
public class ApiNovelBook {
    /**
     * 自己的书书籍id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 小说标题
     */
    @TableField(value = "title")
    private String title;

    /**
     * 小说作者
     */
    @TableField(value = "author")
    private String author;

    /**
     * 小说描述
     */
    @TableField(value = "`desc`")
    private String desc;

    /**
     * 小说地址
     */
    @TableField(value = "read_url")
    private String readUrl;

    /**
     * 类别id
     */
    @TableField(value = "type_id")
    private Integer typeId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 逻辑删除
     */
    @TableField(value = "remove_flag")
    @TableLogic
    private int removeFlag;

    @TableField(value = "source_type")
    private Integer sourceType;

    @TableField(value = "source_id")
    private Integer sourceId;

    @TableField(value = "img_url")
    private String imgUrl;

    public static final String COL_ID = "id";

    public static final String COL_TITLE = "title";

    public static final String COL_AUTHOR = "author";

    public static final String COL_DESC = "desc";

    public static final String COL_READ_URL = "read_url";

    public static final String COL_TYPE_ID = "type_id";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_REMOVE_FLAG = "remove_flag";
}